package session.stateless.CRM;

import entity.CRM.Discount;
import javaclass.ProductType;
import java.util.List;
import javax.ejb.Local;

@Local
public interface DiscountBeanLocal {
    public Long createDiscount(ProductType productType, Long lowerLimit, Long higherLimit, Double discountRate);
    public void modifyDiscount(Long discountId, Long lowerLimit, Long higherLimit, Double discountRate);
    public void deleteDiscount(Long discountId);
    
    public Double calculateDiscountRate (ProductType productType, Long realQuantity);
    public List<Discount> getDiscounts();
    
    //Extra methods
    public boolean checkConflict(ProductType productType, Long lowerLimit, Long higherLimit);
    public List<Discount> getDiscountsByType(ProductType productType);
  
}
